<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath %>"/>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>四季奶坊首页</title>
  <script src="js/vue.js"></script>
  <script src="js/httpVueLoader.js"></script>
  <link rel="stylesheet" href="https://unpkg.com/element-ui@2.14.1/lib/theme-chalk/index.css">
  <script src="https://unpkg.com/element-ui@2.14.1/lib/index.js"></script>
  <style>
    /* #app {
      margin: 1em;
      font-size: 1.5em;
    } */
    * {
      padding: 0;
      margin: 0;
      font-family: 'Open Sans Light';
      letter-spacing: .05em;
    }

    html {
      height: 100%;
    }

    body {
      height: 100%;
      overflow: hidden;
    }

    #app {
      position: absolute;
      width: 900px;
      top: 30%;
      left: 50%;
      transform: translate(-40%, -30%);
    }

    .bg {
      float: left;
    }

    img {
      width: 300px;
      height: 300px;
    }

    .intro {
      width: 300px;
      float: left;
      padding: 100px;
    }
  </style>
</head>

<body>
  <div id="app">
    <div class="bg">
      <img src="images/image01.jpg" alt="">
    </div>
    <div class="intro">
      <p>四季奶坊以古早手工原沏中国饮品为主打，搭配手工新鲜水果茶、新派奶盖茶等系列，多元化经营，实现一店顶多店。</p>
    </div>
    <el-button type="success" @click="successClick(1)" plain>我要点餐</el-button>
    <el-button type="danger" @click="successClick(2)" plain>我是店员</el-button>
    <el-button type="info" @click="successClick(3)" plain>使用文档</el-button>
  </div>
  <script>
    Vue.use(httpVueLoader);

    new Vue({
      el: "#app",
      methods: {
        successClick(type) {
        	if(type===1){
            	window.location.href="order/getAll"
            	return
        	}
        	if(type===2){
            	window.location.href="/MilkShop/login.jsp"
            	return
        	}
        	if(type===3){
            	window.location.href="member.html"
            	return
        	}
        }
      },
    })
  </script>
</body>
</html>